from dataclasses import dataclass
from typing import List, Optional

from app.models.metadata import Subject
from app.models.student import Student, BaseStudent


@dataclass
class Exam:
    # 考试名称
    exam_title: str
    # 学科
    subject: Subject
    # 学科平均分
    avg_score: Optional[float] = None
    # 及格率
    pass_rate: Optional[float] = None
    # 实际考试人数
    actual_num: Optional[int] = None
    # 班级人数
    expected_num: Optional[int] = None
    # 成绩前3名
    top3: List[BaseStudent] = None
    # 成绩后3名
    bottom3: List[BaseStudent] = None
